<ul *ngIf="pagination && pagination.pageCount.length >  1" class="pagination pagination-centered pagination-sm">
    <li><a (click)="pagination.prevPage()">上一页</a></li>

    <li *ngIf="pagination.pageCount.length > 10" [ngClass]="{'active': pagination.pageNumber === 1}">
        <a (click)="pagination.skipToPageNumber(1)">{{1}}</a>
    </li>

    <li *ngIf="pagination.pageCount.length > 10 && pagination.pageNumber >= 5"><a>...</a></li>

    <ng-template ngFor let-item [ngForOf]="pagination.pageCount" let-i="index">
        <li *ngIf="pagination.showPageNumber(i + 1)" [ngClass]="{'active': pagination.pageNumber === i + 1}">
            <a (click)="pagination.skipToPageNumber(i + 1)">{{i + 1}}</a>
        </li>
    </ng-template>

    <li *ngIf="pagination.pageCount.length > 10 && pagination.pageNumber <= pagination.pageCount.length - 4"><a>...</a></li>

    <li *ngIf="pagination.pageCount.length > 10 && pagination.pageNumber !==  1" [ngClass]="{'active': pagination.pageNumber === pagination.pageCount.length}">
        <a (click)="pagination.skipToPageNumber(pagination.pageCount.length)">{{pagination.pageCount.length}}</a>
    </li>

    <li><a (click)="pagination.nextPage()">下一页</a></li>
</ul>